n=int('Please enter the number of layers :')
lstPre=[1]
print(lstPre)
for i in range(n-1):
    lstTemp=lstPre[:]
    lstTemp.insert(0,0)
    lstTemp.append(0)
    lstNext=[]
    for i in range(len(lstTemp)-1):
        lstNext.append(lstTemp[i]+lstTemp[i+1])
    lstPre=lstNext[:]
    print(lstNext)